<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>元素3D变换效果</title>
    <style>
        .fu>div {
            width: 200px;
            height: 200px;
            border: 5px solid #0aa1ed;
            text-align: center;
            line-height: 200px;
            font-size: 80px;
            position: absolute;/* 绝对定位，脱离文档流*/
            margin: 200px 300px;
        }
        /* 开启视角 */
        .show {
            perspective: 800px;
        }
        /* 让父元素开启3D效果*/
        .fu {
            transform-style: preserve-3d;
        }
        .z1 {
            transform: translateZ(100px);
        }
        .z2 {
            transform: translateZ(0);
        }
        .z3 {
            transform: translateZ(-100px);
        }
        .z4 {
            transform: translateX(350px) rotateX(30deg);
        }
        .z5 {
            transform: translateX(700px) rotateY(30deg);
        }
    </style>
</head>
<body>
    <!-- 1.定义视角 -->
    <div class="show">
        <!-- 2.开启3D效果，代表“体” -->
        <div class="fu">
            <!-- 3.代表每一个二维面 -->
            <div class="z1">1</div>
            <div class="z2">2</div>
            <div class="z3">3</div>
            <div class="z4">4</div>
            <div class="z5">5</div>
        </div>
    </div>
</body>
</html>